import React from 'react';
import PropTypes from 'prop-types';
import DefaultNoticeBar from '@welab/fx-ui/components/NoticeBar';
// import fn from '@welab/fx-ui/components/PlateformHalf';
import SystemIcon from './SystemIcon';
import { noticeBar } from '../theme';

const NoticeBar = props => (<DefaultNoticeBar {...props} iconComponent={SystemIcon} />);
NoticeBar.defaultProps = {
  icoNotice: false,
  iconRight: null,
  text: null,
  theme: noticeBar.noticeText,
  onClick: null,
};
NoticeBar.propTypes = {
  /**
   * ### NoticeBar 属性说明
   *
   * 注意条
   *
   * | Name | Type | Default | Details | isRequired |
   * | ------:| -----------:| -----------: | -----------: | ------:|
   * | theme | object | | 主题 | no|
   * | icoNotice | bool | false | 注意小喇叭 | no |
   * | iconRight | object | null | 右侧图标 | no |
   * | text | string | | 注意文字 | no |
   *
   * ### NavBar 代码示例(详见示例项目)
   *
   * ```html
   * <NoticeBar theme={NavBar} />
   * ```
   */
  theme: PropTypes.instanceOf(Object),
  icoNotice: PropTypes.bool,
  iconRight: PropTypes.instanceOf(Object),
  text: PropTypes.string,
  onClick: PropTypes.func,
};

export default NoticeBar;
